﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PCLawPrototype
{
    public partial class NewTask : Form
    {
        public bool IsUpdated = false;
        public NewTask()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Common.rows = dgvTask.Rows;
            this.Close();
        }

        private void NewTask_Load(object sender, EventArgs e)
        {
            for (int index = 0; index < dgvTask.Rows.Count - 1; index++)
            {
                DataGridViewRow row = dgvTask.Rows[index];
                row.Visible = IsUpdated;
            }
        }

        private void btnHelp_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Help will be shown!");
        }

        private void dgvTask_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
        {
            e.Row.Cells["Status"].Value = "Open";
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
